import Vue from 'vue'
import Router from 'vue-router'
import home from '@/components/home'
import news from '@/components/news'
import GoodsBuy from '@/components/GoodsBuy'

Vue.use(Router)

export default new Router({
  //linkActiveClass用于设置路由被激活时router-link 标签上的类名 
  linkActiveClass:'mui-active',
  routes: [
    {
      path:'/',
      redirect:'/home'
    },
    {
      path: '/home',
      name: 'home',
      component: home,
    },
    {
      path:'/news',
      component:news
    },
    {
      path:'/GoodsBuy',
      component:GoodsBuy
    }
  ]
})
